<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class InvestInstitution_model extends CI_Model {

    public $tablename = 'hpg_invest_institution';

    public function __construct()
    {
        parent::__construct();
    }
    
    public function gePageList($keyword, $page=1, $limit=20){
    	$start = ($page-1)*$limit;
    	$query = $this->db;
    	if( $keyword ){
    		$query->like('instustry_name', $keyword);
    	}
    	$count = $query->count_all_results($this->tablename, false);
    	$list = $query->select('*')->limit($limit, $start)->get_array();
    	return [intval($count), $list ? $list : []];
    }
    
}